package com.rzjm.exercise.common.validator.validator;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

import com.rzjm.exercise.common.validator.ValidatorUtils;
import com.rzjm.exercise.common.validator.annotation.Mobile;

public class MobileValidator implements ConstraintValidator<Mobile, String> {

	@Override
	public boolean isValid(String value, ConstraintValidatorContext context) {
		return ValidatorUtils.isMobile(value);
	}

}
